<?php

class Application_Model_DbTable_DbGetUserInfo extends Zend_Db_Table_Abstract
{

    public function getUserInfo(){
    $session_user=new Zend_Session_Namespace('auth');
    	$userName=$session_user->user_name;
    	$GetUserId= $session_user->user_id;
    	$level = $session_user->level;
    	$branch = $session_user-> branch;
    	$id_code = $session_user-> id_code;
    	$fullname = $session_user-> fullname;
    	$user_type = $session_user->user_type;
    	$email = $session_user->email;
    	$info = array("user_name"=>$userName,"user_id"=>$GetUserId,"level"=>$level,"branch"=>$branch,
    			"id_code"=>$id_code ,"fullname"=>$fullname,"user_type"=>$user_type,"email"=>$email
    			);
    	return $info;
    }
    public function getUserInfoteacher(){
    	$session_user=new Zend_Session_Namespace('auth');
    	$userName=$session_user->username;
    	$GetUserId= $session_user->teacher_id;
    	$info = array("username"=>$userName,"teacher_id"=>$GetUserId);
    	return $info;
    }
}

